package com.tianqingwl.gsystem.content.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.tianqingwl.gsystem.content.pojo.ContentType;

import java.util.List;
import java.util.Map;

public interface ContentTypeService {
    void listContentTypePage(Page<ContentType> contentTypePage, String typeName,Integer type,Long contentId);

    ContentType getContentTypeById(Long typeId);

    ContentType getContentTypeByTypeAndId(Long typeId,Integer type);

    ContentType save(ContentType contentType);

    /**
     * 检查ContentType是否拥有文章
     * @param contentTypeIds
     * @return
     */
    boolean haveContent(List<Long> contentTypeIds);

    /**
     * 删除类别或标签
     * @param contentTypeId
     * @param type
     */
    void deleteById(Long contentTypeId,Integer type);

    void deleteByIds(List<Long> contentTypeIds,Integer type);

    boolean haveChild(List<Long> contentTypeIds);

    /**
     * 查询全部类别
     * @return
     */
    List<ContentType> listAllType();

    boolean checkNameExists(ContentType contentType);

    /**
     * 查询内容的标签
     * @param contentTypePage
     * @param contentId
     */
    void listContentTypePage(Page<ContentType> contentTypePage, Long contentId);

    /**
     * 30个热门标签
     * @return
     */
    List<Map> listHotContentTag();
}
